package ${entityPackage};

import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
<#list columns as column>
<#if column.javaType == "java.util.Date">
import java.util.Date;
</#if>
</#list>

/**
 * ${tableComment!}
 * @author ${author!}
 * @date ${date?string("yyyy-MM-dd")}
 */
@Data
@Table(name = "${tableName}")
@Entity
public class ${domainObjectName} implements Serializable {
    private static final long serialVersionUID = 1L;

<#list columns as column>
    <#if column.primaryKey>
    /**
     * ${column.columnComment!}
     */
    @Id
    <#if column.autoIncrement>
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    </#if>
    @Column(name = "${column.columnName}")
    private ${column.javaType} ${column.columnName?uncap_first};
    
    </#if>
</#list>

<#list columns as column>
    <#if !column.primaryKey>
    /**
     * ${column.columnComment!}
     */
    @Column(name = "${column.columnName}")
    private ${column.javaType} ${column.columnName?uncap_first};
    
    </#if>
</#list>
}
